Giter VIP home page Giter VIP logo

cppwamp's People

Contributors

ecorm avatar estan avatar ibjeong avatar postry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppwamp's Issues

WebSocket transport

WebSocket++ could be used for this. Wrappers compatible with the Transport and TransportBuffer concepts would need to be written.

Verify usability with Visual Studio 2015

Verify that the library can be used with Visual Studio 2013. Identify, if necessary, the C++11 features that would need to be worked around to support VS2013.

Make it harder to forget yielding a result from within RPC handlers

It's currently too easy to forget to issue an Invocation::yield from within RPC handlers. It should be changed so that the RPC handler is forced to return one of the following:

  • a RESULT with optional payload and optional advanced attributes,
  • an ERROR result, which could also be thrown from within the RPC handler
  • a special "no result" type that explicitly indicates that the RPC already has, or will be, manually returning a result via Invocation::yield. This makes it possible for the user to return the result in a different asynchronous handler context.

A discriminated union type could be used to contain those three variants, without incurring the cost of dynamic allocation if polymorphism was used instead.

Pool AsioBuffers

Consider pooling AsioBuffers instead of allocating them from the heap each time one is needed. However, if an unusually large message is sent or received rarely, that pooled buffer will needlessly waste memory. The pool should somehow be smart enough to discard such unusually large buffers.

I have considered chaining fixed-size chunks to form arbitrarily-sized buffers, but AFAICT, the msgpack-c unpacker needs the message to be completely contiguous in memory.

Implement "sticky" option dictionaries

Allows Client instances to store "sticky" option dictionaries that are always used for the same type of operation. For example, the same CALL.Options.timeout|integer option could be reused for a particular remote procedure, or for all RPCs.

Use the Boost.Endian that's part of Boost 1.58.0

Boost.Endian will be part of Boost 1.58.0. When Boost 1.58.0 is released, we should make that the minimum required version for CppWAMP, and drop the dependency on the "external" Boost.Endian library.

Implement progressive call results for callee

Implement progressive call results, for the callee, as per the advanced spec.

Callee requirements:

  • HELLO.Details.roles.callee.features.progressive_call_results|bool := true
  • YIELD.Options.progress|bool := true
  • Receive INVOCATION.Options.receive_progress|bool := true

Note from spec:

The progressive YIELD and progressive RESULT may also be empty, e.g. when those messages are only used to signal that the procedure is still running and working, and the actual result is completely delivered in the final YIELD and RESULT

This feature does not require any special treatment for the callee.

Implement call timeouts for caller

Caller requirements:

  • HELLO.Details.roles.caller.features.call_timeout|bool := true
  • CALL.Options.timeout|integer

This feature does not require any other special treatment for the callee.

Replace Client overloads with fluent API

If an optional "details" parameter is added to Client operations, the combination of optional parameters will result in many overloads. For example:

call(procedure, handler);
call(procedure, args, handler);
call(procedure, details, handler);
call(procedure, args, details, handler);

The above overloads could be replaced by a single fluent API:

call( Rpc("foo")
    .withArgs({42})
    .withKwArgs({{"bar",false}})
    .withBlacklist({12345678})
    .andDiscloseMe(),
    handler );

This mechanism might also be used to unify the CoroClient and CoroErrcClient APIs under the same class.

Implement call timeouts for callee

Client requirements:

  • HELLO.Details.roles.callee.features.call_timeout|bool := true
  • Receiving INTERRUPT messages

The feature would require significant changes to the Client and Session classes. This feature should be implemented along with #21.

Implement basic WAMP router classes

Implement a RouterSession class that derives from internal::Session and implements the broker/dealer roles according to the basic spec. The RouterSession instances would share information with a common RouterRealm class.

Reading configuration parameters and providing a meta-API should be provided in separate router application classes.

Add test cases for executing Session operations within call/event slots

Add test cases for Session operations being executed within call/event slots. For example, verify that a client app can unsubscribe from within a pub/sub event handler.

Event/call slots are always posted to the I/O service; they are never executed with the context of the WAMP message receive handler. So while I doubt there are currently are any issues, it would be good to test for them anyway.

Revise default RawsockMaxLength parameter?

The default RawsockMaxLength parameter (for maximum received message length) in TcpConnector::create and UdsConnector::create is currently set to 64kB. This default value was arbitrarily chosen to fit into the default socket buffer size in Linux, which is ~85kB on my system.

Should the default value instead be the maximum length of 16MB? If users have tighter memory constraints, they can always specify a different maximum receive length.

Add test cases for v0.2.0 advanced features

Add cases for advanced featured supported in v0.2.0. Some may not be testable if they're not supported on Crossbar, or if they're not "symmetrically" supported by CppWAMP.

Provide scoped connections/registrations

In some situations, the user may not want the burden of having to keeping Subscription/Registration objects "alive". Topic and Procedure should provide a .permanently() option which indicates that the subscription/registration will be valid for the lifetime of the Session object. This option would also make the Session object keep its own copy of the Subscription/Registration shared objects.

If this option is used, the user has to ensure that the callbacks can be called while the Session is established.

Pass Details dictionary to call slots and event slots

  • Add a 'details' read-only property of type wamp::Object to the Invocation class
  • Event slots should take a PublicationInfo object as their first parameter, which contains the PublicationId and Details dictionary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.