Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Anyone else using TopShelf?

Anyone else using TopShelf?

Scheduled Pinned Locked Moved The Lounge
question
18 Posts 12 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Septimus Hedgehog

    I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

    If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

    R Offline
    R Offline
    Ron Beyer
    wrote on last edited by
    #4

    I'm working on a windows service right now, and haven't heard of TopShelf, but I did just look it up... Its interesting in that as you mentioned, you can debug with the start instead of attaching to the process, however the big turn-off for me is the inability to host multiple services. They said something about a plug-in being available later, but I really don't want to create one executable for the 8 or so services that are going into this project... I may re-visit when they come out with the extensions to allow multiple services.

    S J 2 Replies Last reply
    0
    • R Ron Beyer

      I'm working on a windows service right now, and haven't heard of TopShelf, but I did just look it up... Its interesting in that as you mentioned, you can debug with the start instead of attaching to the process, however the big turn-off for me is the inability to host multiple services. They said something about a plug-in being available later, but I really don't want to create one executable for the 8 or so services that are going into this project... I may re-visit when they come out with the extensions to allow multiple services.

      S Offline
      S Offline
      Septimus Hedgehog
      wrote on last edited by
      #5

      Ron, that's a fair observation and I too read about that on the website. To be honest, I've never required multiple services before but I know there are reasons why some projects need that facility.

      If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

      1 Reply Last reply
      0
      • S Septimus Hedgehog

        Three advantages that I've come to like so far are: 1. If your application is called fred.exe then running it in a command window as "fred.exe install" will install it as a service and "fred.exe uninstall" will remove it. That's far easier on the eye! 2. To debug a Windows service you'd have to attach a process to it in VS. That's fine to a point but it gets a bit messy if you want to debug the Start event. With TopShelf, that's a thing of the past; all you do is run it like you would a console application. I can't tell you how much time that has saved me this last week. 3. Its HostFactory lambda methods also have a lot of goodies you can bring to the party. :thumbsup:

        If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu Peter
        wrote on last edited by
        #6

        The first two not new to me - you can see my article about windows service to host WCF services (Windows Service to Host Multiple WCF Services[^]), where I have these features - or most of them. What catch me eyes that TopShelf provides a unified API for service configuration and that is compatible with Mono...

        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

        1 Reply Last reply
        0
        • S Septimus Hedgehog

          I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

          If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

          K Offline
          K Offline
          Keith Barrow
          wrote on last edited by
          #7

          We use it at work, though I haven't touched it directly. Those who have used it have been impressed.

          PB 369,783 wrote:

          I just find him very unlikeable, and I think the way he looks like a prettier version of his Mum is very disturbing.[^]

          1 Reply Last reply
          0
          • S Septimus Hedgehog

            Three advantages that I've come to like so far are: 1. If your application is called fred.exe then running it in a command window as "fred.exe install" will install it as a service and "fred.exe uninstall" will remove it. That's far easier on the eye! 2. To debug a Windows service you'd have to attach a process to it in VS. That's fine to a point but it gets a bit messy if you want to debug the Start event. With TopShelf, that's a thing of the past; all you do is run it like you would a console application. I can't tell you how much time that has saved me this last week. 3. Its HostFactory lambda methods also have a lot of goodies you can bring to the party. :thumbsup:

            If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

            R Offline
            R Offline
            Rob Philpott
            wrote on last edited by
            #8

            Again, I'm afraid I'm unfamiliar with this product, but I and I think most people tend to write Windows Services so that they can run as a console app. (with a -console switch or something similar) to aid development and debugging. I will look at this this morning and see if I'm missing out!

            Regards, Rob Philpott.

            1 Reply Last reply
            0
            • S Septimus Hedgehog

              I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

              If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

              R Offline
              R Offline
              Rob Philpott
              wrote on last edited by
              #9

              I've just started looking at this and it's not going well. On the website I'd expect a clear rationale for it's existence. But what they tell me it does is this: "Remove that friction" - totally meaningless. "Robusto!" - also totally meaningless but alluding to something to do with AppDomains. "Cross-Platform" - OK, fair enough. "Fueled by Awesome" - oh dear, product evaluation terminated. When you click on 'learn more' on any of these, nothing happens. It may be a good product, but the marketing sucks.

              Regards, Rob Philpott.

              S 1 Reply Last reply
              0
              • R Rob Philpott

                I've just started looking at this and it's not going well. On the website I'd expect a clear rationale for it's existence. But what they tell me it does is this: "Remove that friction" - totally meaningless. "Robusto!" - also totally meaningless but alluding to something to do with AppDomains. "Cross-Platform" - OK, fair enough. "Fueled by Awesome" - oh dear, product evaluation terminated. When you click on 'learn more' on any of these, nothing happens. It may be a good product, but the marketing sucks.

                Regards, Rob Philpott.

                S Offline
                S Offline
                Septimus Hedgehog
                wrote on last edited by
                #10

                100% agree. I couldn't make sense of those awful Americanisms used on the website either. I thought those links were somehow nuked by Firefox but I wasn't that stupid to load IE; I really didn't feel that lucky. I don't know what the buffoons were thinking when they put the website together. As they say, it's neither useful or ornamental. Eventually I did find some documentation about the way it works and the command line options and from that point the content was surprisingly useful and helpful. I just installed our service on two machines and it was quite pain free even though the birth was a bit sore. The next one should be much easier. ;)

                If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                1 Reply Last reply
                0
                • S Septimus Hedgehog

                  I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

                  If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                  E Offline
                  E Offline
                  EbenRoux
                  wrote on last edited by
                  #11

                  If memory serves NServiceBus may have been using this when I was still using NServiceBus (v1.9). They may still be. I needed something similar and ended developing my own generic host to do the little bit I required for my FOSS service bus (Shuttle). I'm on a drive to get my documentation up to scratch for the 2.1.2 release but if you are interested in taking a look at the code (or nuget 'PM> Install-Package shuttle-core'): NuGet Package Page[^] The NuGet package contains *everything* but I'll be creating individual packages for the various components. The GitHub project for the core that contain Shuttle.Core.Host is here: https://github.com/Shuttle/shuttle-core[^] The docs *really* need work but will be on GitHub pages (still empty): http://shuttle.github.io/shuttle-core/[^] Probably not quite at the level of TopShelf but you may find it interesting.

                  1 Reply Last reply
                  0
                  • S Septimus Hedgehog

                    I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

                    If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                    R Offline
                    R Offline
                    RafagaX
                    wrote on last edited by
                    #12

                    I've never used it, but except for the Mono compatibility I see no reason to do so.

                    CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...

                    1 Reply Last reply
                    0
                    • S Septimus Hedgehog

                      I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

                      If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                      M Offline
                      M Offline
                      Mark J Miller
                      wrote on last edited by
                      #13

                      I've been using it for four years. I've introduced it to 3 different teams who were all still developing services the hard way (creating a windows service installer project then attaching to the service and debugging). 1) it makes it easy to install your service, just "[yourservice].exe -install" and it's very configurable. 2) it makes it easy to develop against. We have multiple service projects in our solution. We just set up debugging to start all the relevant services at once. Hit F5 and they are all running - no install needed. To be fair a lot of places do this w/o TopShelf, but why re-invent the wheel? 3) supports transactional installs (install fails you can create rollback steps) 4) supports service recovery (actions to take on first, second and third service failure: restart service, run a program or restart computer) 5) It would easily support hosting multiple services, but you'd have to provide that yourself - there's nothing stopping you, it just isn't out of the box. At a couple places I've written a single host console that will boostrap and host any dll as a service as long as there's a class that implements the interface I'm looking for. Modifying it to host multiple services would be pretty simple I assume. It really is a fantastic open source project and its free so complaining about the website and docs is really just nit-picking.

                      Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."

                      1 Reply Last reply
                      0
                      • R Ron Beyer

                        I'm working on a windows service right now, and haven't heard of TopShelf, but I did just look it up... Its interesting in that as you mentioned, you can debug with the start instead of attaching to the process, however the big turn-off for me is the inability to host multiple services. They said something about a plug-in being available later, but I really don't want to create one executable for the 8 or so services that are going into this project... I may re-visit when they come out with the extensions to allow multiple services.

                        J Offline
                        J Offline
                        Jason R Woods
                        wrote on last edited by
                        #14

                        Yeah, the documentation is not very clear in that respect and when I first read it, that's what I thought, too. However, after using TopShelf for about 3 months now, I can tell you that this is not the case. I think what that means is that you can only have one service per application. In the application I'm working on currently, I have 4 services (each in their own exe), running with TopShelf.

                        R 1 Reply Last reply
                        0
                        • J Jason R Woods

                          Yeah, the documentation is not very clear in that respect and when I first read it, that's what I thought, too. However, after using TopShelf for about 3 months now, I can tell you that this is not the case. I think what that means is that you can only have one service per application. In the application I'm working on currently, I have 4 services (each in their own exe), running with TopShelf.

                          R Offline
                          R Offline
                          Ron Beyer
                          wrote on last edited by
                          #15

                          Thats the problem, I have around 8 services in a single EXE, I don't want to break them into individual EXE's because it doesn't make sense to segregate them in the respective app domains. They share a lot of data and I'd rather not add the overhead of piping between services.

                          1 Reply Last reply
                          0
                          • S Septimus Hedgehog

                            I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

                            If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                            M Offline
                            M Offline
                            Mathew Crothers
                            wrote on last edited by
                            #16

                            This is the only Top Shelf I use http://stillspirits.com/collections/top-shelf-spirits-1[^] very yummy

                            1 Reply Last reply
                            0
                            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                              Never heard of, but now added to my learn list...Thanks.

                              I Offline
                              I Offline
                              ISanti
                              wrote on last edited by
                              #17

                              Me neither heard of ,thank you for the reference.

                              Sorry for my bad English

                              1 Reply Last reply
                              0
                              • S Septimus Hedgehog

                                I've recently had to get to know it quite well. Having come from the old school of Windows services development and adding them to the SMC using installation media, I've come to like TopShelf very much. Is anyone else using it? I'd like to read your experiences (good or bad) about it.

                                If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

                                U Offline
                                U Offline
                                User 10270509
                                wrote on last edited by
                                #18

                                - For simplicity without writing install scripts. - For easy starting and stopping form the command line. - For very easy logic to create a service, add all the configuration in one place. (name, restart, user configuration). - For easy debugging as a console application. - For easy integration to Dependency Injection. - For easy trapping of fatal errors in your service with a simple try catch around the top shelf process. It is definitely the easiest way to write services that I know of.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups