Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localnode access service #646

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ijon
Copy link
Contributor

@ijon ijon commented Sep 7, 2015

DO NOT MERGE

This PR contains work on localnode service.

localnode service is a cocaine service spinned off by the srw and its purpose is to give srw workers and other local (also remote) users easy access to the facilities of the local elliptics node.
localnode closely resembles existing elliptics service, but unlike it localnode directly communicates with server node, so there is no middle layers, no additional costs and no configuration.
That is the main reason behind localnode.

This code is actually a revival of someone's previous effort, dusted off and cleaned up a bit.

As it is, localnode service is in working condition and is tested, but it's not ready for inclusion into a mainline yet.

Future direction:

  • unification with elliptics service, they are supposedly too similar to have them both; it could be one implementation (interface layer and all) with initialization which takes either client elliptics node (elliptics service in a pure cocaine cloud) or server elliptics node (localnode running inside srw)
  • interface evolution, right now its sketchy
  • close fitting for use by and with srw workers (exec support, sending replies etc.)
  • texts cleanup
Ugliness

cocaine/include/cocaine/actor.hpp is a pristine copy of actor.hpp from cocaine-core sources. There is no other way, unfortunately: srw require actor_t defined in actor.hpp to be able to register localnode without requiring external config, but, by whatever reason, actor.hpp doesn't considered a part of public interface in cocaine v0.11 (in cocaine v0.12 it does).


This change is Reviewable

on<direct_access::write_data>("write_data", std::bind(&direct_access_t::write_data, this, _1, _2, _3));

// find all groups that resides on our node, and set them as session default
m_session_proto.set_groups(find_local_groups(m_session_proto));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will force m_session_proto to perform action on every single group which is present in current server's config.
It is probably not intended behaviour

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group list in session_proto work only as default, it gets corrected on every operation.

@ijon ijon force-pushed the feature-local-node-access-service branch 2 times, most recently from 43a1c92 to 6692cfd Compare October 2, 2015 08:43
@ijon ijon force-pushed the feature-local-node-access-service branch from 6692cfd to ef85113 Compare November 11, 2015 17:04
@ijon ijon force-pushed the feature-local-node-access-service branch from ef85113 to 52ef39f Compare November 27, 2015 20:05
Localnode is a cocaine service built in srw. Internally it directly
uses server's node and (through a very simplified interface) gives
access to basic data operations without the need to use and configure
the actual elliptics client.

In essence, localnode service is an another entry point for clients
that use cocaine channel and protocol.
@ijon ijon force-pushed the feature-local-node-access-service branch from 52ef39f to 298c734 Compare February 19, 2016 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants