Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 24 20:05
    coveralls commented #589
  • Aug 24 20:04
    coveralls commented #589
  • Aug 24 20:04
    coveralls commented #589
  • Aug 24 19:59
    shawnmcknight opened #589
  • Aug 24 04:54
    zllovesuki commented #577
  • Aug 24 04:54
    zllovesuki commented #577
  • Aug 24 04:53
    zllovesuki commented #577
  • Aug 21 13:31

    icebob on master

    syntax should always be first f… required and optional are no lo… rebuild using correct proto3 sy… and 2 more (compare)

  • Aug 21 13:31
    icebob closed #588
  • Aug 21 13:30
    icebob commented #588
  • Aug 21 13:26
    coveralls commented #588
  • Aug 21 12:28
    coveralls commented #588
  • Aug 21 12:22
    coveralls commented #588
  • Aug 21 12:20
    coveralls commented #588
  • Aug 21 12:11
    fugufish opened #588
  • Aug 21 10:19
    icebob commented #587
  • Aug 21 08:15
    icebob commented #101
  • Aug 20 16:27
    fugufish commented #101
  • Aug 19 03:20
    nicolasxu edited #587
  • Aug 19 03:19
    nicolasxu edited #587
Felipe Barros Cruz
@FelipeBarrosCruz
Hello guys
someone was seen this error log before?
[2019-08-09T19:22:36.500Z] ERROR 9a146d48c083-33/API: Request error! ServiceNotFoundError : Service 'y000000000005.cfg' is not found.
I realize this error when has timeout
Rodolfo Escalante
@lkrodi
Hi, how are you, good afternoon. I'm from Lima, Peru.
I would like to integrate Moleculer with SQL Server, how feasible it would be since the information I get is a lot and about 1GB. I use Google Maps to graph points and polygons in the frontend.
Arye Shalev
@pantchox
Hi guys, who ever has a blog or post on Medium stuff that are related to programming, I am working on a new publishing platform, its my side project and i worked reallllly hard on it - I would love for your feedback! if you love publishing and curating content - PLEASE PM ME :) thanks!
Lebonlebien
@Lebonlebien
Hi guys, I'm new amoung you. I would want to ask if is it possible to implement microservices with Moleculer while using React Native ? if yes can someone show me a tutorial about this ?
Shawn McKnight
@shawnmcknight
@Lebonlebien Some of that would depend on how you are accessing data from the server, but there should be no reason why Moleculer can't be a solve for it. You might want to look at the API Gateway (https://moleculer.services/docs/0.13/moleculer-web.html) to see a package which externally exposes moleculer services to HTTP requests
Sandeep Gupta
@iamsandeepgupta
Hi.... do we have socket implementation doc in this.
Will
@tavurth

Hey, I'm looking at using molecular for an up-coming project, and it seems pretty great, but I'm afraid that if I start with molecular, I'll have to build everything with molecular.

Is there some documentation available which shows how to integrate with an already existing NATS microservice, or how I could move one of my microservices to a lower level language for optimisation?

Basically I want to understand to what extent Molecular is going to tie my hands, and the escape hatches which allow alternate use cases.

Morten Nielsen
@morkeleb
We're having issues with testing a service that is using async await
unless we chain calls using then the jest framework wont pickup the chained executions.
It executes the first await correctly but looses track of the async calls coming after
specifically we're testing an event
Leandro Hoffmann
@lehno
@iamsandeepgupta do you mean web sockets?
Sandeep Gupta
@iamsandeepgupta
@lehno yeah i mean socket.io
https://www.npmjs.com/package/socket.io
this one
Shawn McKnight
@shawnmcknight
@tavurth Moleculer doesn't limit your communication possibilities and you can mix-and-match services of different frameworks. There's nothing to stop you from calling out from a moleculer service using a different communication vehicle (e.g. HTTP, GraphQL, messaging). For inbound calls you can either match moleculer's communication protocols which are open sourced or use something like moleculer's HTTP-based API gateway to get into the moleculer stack
Icebob
@icebob
@morkeleb could you share some code?
@davidroman0O what is your use-case for timeout in action definition. Because in my mind the best place to set timeout is in the caller side, so who calls the action, wants to adjust the maximum execution time.
Morten Nielsen
@morkeleb
@icebob I added a short example as an issue: moleculerjs/moleculer#586
Dan Kuida
@dkuida
@morkeleb the awaits work as expected
it is actually tricky that it makes people thik await just waits there
but in fact it keeps a pointer to the location and continues to run to what is analyzed asa nn dependant code
for that reason it is a bad idea to make a loop with await
if you really need to wait for each of these
Icebob
@icebob
Nicolas Xu
@nicolasxu
node created using code can not discover node created using moleculer-runner. But node created using moleculer-runner can discover node created using code. They both on same laptop, with same broker option. Any suggestion?
David Roman
@davidroman0O
@icebob My use case is to be able to set env vars to some actions to be able to have a timeout edited outside of the app and in the action parameters
I made it works with this middleware that override your own ahah
function wrapTimeoutMiddlewareWrapped(handler) {
    return function timeoutMiddleware(ctx) {
        //  Override before it happens
        if (ctx.action.options && ctx.options.timeout != null) {
            if (ctx.action.options.timeout < ctx.options.timeout) {
                ctx.options.timeout = ctx.action.options.timeout;
            }
        }
        return handler(ctx);
    }.bind(this);
}

module.exports = function() {
    return {
        localAction: wrapTimeoutMiddlewareWrapped,
        remoteAction: wrapTimeoutMiddlewareWrapped
    };
};
I've searched for your timeout middleware, copy/paste, edited it and it works
Will
@tavurth
@shawnmcknight Thank you for the information!

I'm looking for a way to define route aliases inside of a service, is there a way to do that outside of the API gateway?

I have my services defined like this:

 - api
 | ---- first service
 | ---- second service

But I don't want to store all the route aliases inside the API since I don't know if second service will be present every time.

Anyone have any good suggestions for how to go about defining the route aliases for second service inside of the configuration of second service?
oldeng
@oldeng
how to upload file?
oldeng
@oldeng
thank u
@AndreMaz thanks
coyotte
@coyotte
Hey guys, need some help,
Is it possible to stop execution from before-hook and return results? @icebob?
Icebob
@icebob
@coyotte only if you throw an error.
dluisbrbr
@dluisbrbr
Hello everyone!
I'm starting with molecular and microservices.
I had some doubts when starting the framework studies:
How are services configured as remote?
Can they be running on another server on the same network?
How should services be started on different servers?
Are there any tutorials on getting started and good practices besides the documentation?
Sorry for the basic questions.
Shawn McKnight
@shawnmcknight
@dluisbrbr The Networking topic in the documentation covers a lot of what you're asking regarding remote nodes, but the short answer is that services can be run on the same node or they can be as separate as you want them to be
moleculer-runner is, in my opinion, the best way to configure services for multiple nodes. We generally use environment variables to configure which services to start on any given node
You'll need a configured transporter in order to have remote nodes communicate with each other (covered in that networking topic). There are several to choose from -- we use NATS in our deployment. I've seen many others mention using Redis as well. I don't have experience with use of the other transporters.
The examples topic has links to sample repos, its probably a good place to review
Amr Essam
@amroessam
Guys quick question, if I wanna enforce a param schema in actions I know I can use the param option, but what if my param should be expecting an object and I wanna defined the object properties scehma
For example
params: { object: "object", "object.key" : "number" }
can I do something like this? @icebob
Amr Essam
@amroessam
Nevermind, found it in the examples. For anyone asking params: { user: { type:'object', props: {username: type: 'string'...} }
Amr Essam
@amroessam
Hi guys another question, do you know how to create events programmatically at run time?