Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alex Hultman
    @alexhultman
    oh, shit
    I just posted an issue because I couldn't find any way to get in contact
    Well, I want to simply connect to the ws echo server from outside of the http://localhost:8000
    that is, I want to connect from a different client directly to ws://localhost:8000/echo
    Alex Hultman
    @alexhultman
    it doesn't work, it only works from the http address via the browser
    Robin Zimmermann
    @robinzimmermann

    Hi @alexhultman. Do you mind posting your config file?

    The URL you use has to match the <accept> line of your service. So if it says, for example, ws://localhost:8000/echo then that is the address your client has to use.

    There are options, depending on what you want to do. If you simply want to address your host directly, then either replace that <accept> or add another one. (You can have multiple <accept> statements.)

    So you could add another one like this: <accept>ws://myhostname:8080</accept>. Then you can connect to both the localhost address or the myhostname address.

    Alex Hultman
    @alexhultman
    hi, I use the default settings straight from the install

    my conf/gateway-config-minimal looks like this:

    <service>
    <name>echo</name>
    <description>Simple echo service</description>
    <accept>ws://${gateway.hostname}:${gateway.base.port}/echo</accept>

    <type>echo</type>
    </service>

    (excerpt)
    so it seems to have an accept tag that matches the one I'm trying to connect to
    Robin Zimmermann
    @robinzimmermann
    I just saw your github ticket. I think I misunderstood what you were trying to do.
    Alex Hultman
    @alexhultman
    my client is the websocket.org demo client (I assume this uses the browers own implementation straight up)
    Robin Zimmermann
    @robinzimmermann
    I think you can open the websocket.org echo test and try to connect to your gateway. Try this URL: http://websocket.org/echo.html?location=ws://localhost:8000/echo
    Yes, websocket.org uses the native websocket from the browser.
    Alex Hultman
    @alexhultman
    yeah this is exactly what I'm trying
    just shows error with or without SSL
    but when I connect via the http://localhost:8000 it works
    Robin Zimmermann
    @robinzimmermann
    Is your browser running on the same machine as the gateway?
    Alex Hultman
    @alexhultman
    yep
    I'm on Linux
    Robin Zimmermann
    @robinzimmermann
    Does your echo service have a cross-site constraint?
    Alex Hultman
    @alexhultman
    and I just installed the unmodified kaazing gateway community edition 5.00
    this is something I have considered, must be something with cross-site
    I don't know
    Robin Zimmermann
    @robinzimmermann
    Okay, give me a sec to find an example.
    Alex Hultman
    @alexhultman
    basically I'm just interested in connecting a client and doing some throughput / scalability benchmarks of the echo server to get some kind of reference point
    Robin Zimmermann
    @robinzimmermann
    Here is an example echo service with a cross site constraint that allows any connection:
      <service>
        <name>echo</name>
        <description>Simple echo service</description>
        <accept>ws://${gateway.hostname}:${gateway.port}/echo</accept>
    
        <type>echo</type>
    
        <!-- Restrict cross site constraints before running in production -->
        <cross-site-constraint>
          <allow-origin>*</allow-origin>
        </cross-site-constraint>
      </service>
    Add that <cross-site-constraint> to your service.
    And try to connect again from the websocket.org echo demo.
    Alex Hultman
    @alexhultman
    works
    thanks a lot
    Robin Zimmermann
    @robinzimmermann
    Cool!
    No worries.
    Can I close that github ticket?
    Alex Hultman
    @alexhultman
    I closed it
    Robin Zimmermann
    @robinzimmermann
    I just saw your updated the ticket. Fast work!
    Glad I could help.
    Alex Hultman
    @alexhultman
    yeah thanks
    Alex Hultman
    @alexhultman
    the server seems to be multithreaded by default
    I have 30 accepts because I have 30 localhost addresses
    when I stress the server it uses multiple cores, can I force it to use only one?
    I also need to echo 100mb, it doesn't allow that by default
    Alex Hultman
    @alexhultman
    from what I have found, the server is very slow
    is the Community edition slower than the main product?
    Robin Zimmermann
    @robinzimmermann

    Hi @alexhultman.

    the server seems to be multithreaded by default
    I have 30 accepts because I have 30 localhost addresses
    when I stress the server it uses multiple cores, can I force it to use only one?

    The server is NIO based. You can pin to the number of cores you want want with a -D parameter. For example, set the GATEWAY_OPTS environment variable prior to starting the gateway:

    export GATEWAY_OPTS='-Dorg.kaazing.gateway.server.transport.tcp.PROCESSOR_COUNT=1'

    from what I have found, the server is very slow
    is the Community edition slower than the main product?

    The Enterprise Gateway is layered on top of the Community Gateway and adds some features. Functionally there are more features in Enterprise Edition, but from a performance perspective they are same.

    If you can describe what you're doing and what you're trying to achieve, perhaps we can make some suggestions.

    I also need to echo 100mb, it doesn't allow that by default

    The gateway limits the inbound message size by default to prevent a denial of service attack that sends large payloads. You can change the value to something larger using ws.maximum.message.size:

    http://kaazing.com/doc/5.0/admin-reference/r_configure_gateway_service/index.html#wsmaximummessagesize

    As an alternative, you can also have the echo service echo back multiple times for each message it receives. In the following example, the echo service will send the message 10 times using the <repeat> property:

      <service>
        <name>echo</name>
        <description>Simple echo service</description>
        <accept>ws://${gateway.hostname}:${gateway.port}/echo</accept>
    
        <type>echo</type>
    
        <properties>
          <repeat>10</repeat>
        </properties>
    
        <!-- Restrict cross site constraints before running in production -->
        <cross-site-constraint>
          <allow-origin>*</allow-origin>
        </cross-site-constraint>
      </service>

    This way you can send a small message to the echo service, but have it send back a larger amount of data.

    Alex Hultman
    @alexhultman
    ah, thanks
    I'm just assembling a benchmark table of different WebSocket servers
    Diego Q.
    @diiegg
    hello, i hope some one can help me, i try tu install the git repo kaazing/gateway in openshift but its no workis, some one know the correct intallation process?
    Satish Badugu
    @sbadugu
    [daniel smith, Kaazing] Hello, diiegg, I am not aware of anything special needed for openshift. I see that openshift supports different kinds of containers. What kind of container are you using? Do you know the base OS of that container?
    Diego Q.
    @diiegg
    hello @sbadugu im usin
    Tomcat 7 (JBoss EWS 2.0) Cartridge
    JBoss Enterprise Web Server is the enterprise-class Java web container for large-scale lightweight web applications based on Tomcat 7. Build and deploy JSPs and Servlets in the cloud.